package com.wyj.controller;

import com.wyj.service.ClientService;
import com.wyj.service.impl.ClientServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ：wyj
 * @description：TODO
 * @date ：2022/12/27 12:10 上午
 */
@RestController
public class ClientController {

    @Resource
    ClientServiceImpl clientService;

    //前端请求方式为 http://localhost:8081/hello?userName=wyj
    @RequestMapping("/hello")
    public String getUserMessage(String userName) {
        String result = clientService.getUserName(userName);
        return result;
    }

}
